<!DOCTYPE html>
<html>

	<head>
		<meta charset="utf-8" />
		<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
		<title>交易汇总</title>
		<link rel="stylesheet" href="__OEM__/css/iconfont.css" />
		<link rel="stylesheet" href="__OEM__/css/css.css" />
		<script src="__PUBLIC__/static/lib/echarts.min.js"></script>
	</head>

	<body>
		{include file="public/header" /}
		<div class="index_conbox">
			<div class="index_content clearfix">
				{include file="public/lefter" /}
				<div class="right">
					<div class="rigtop">
						<span class="title">交易汇总</span>
					</div>
					<div class="indrig_con">
						<div class="tongjbb_box">
							<div class="tongjititle">
								<p>统计报表</p>
							</div>
							<table style="width: 400px;margin: 0 auto;margin-top: 30px;margin-bottom: 30px;">
								<tr><td style="width: 70px;">充值</td>
									<td style="width: 40px;">|</td><td  style="width: 70px;">赠送</td>
									<td style="width: 40px;">|</td><td  style="width: 70px;">抵扣</td></tr>
								<tr><td><span class="tongji_typri">{$data['glj_cz_ms']}</span>
									<span class="tongji_tynum">({$data['glj_cz']}笔)</span></td>
									<td></td><td><span class="tongji_typri">{$data['glj_zs']}<span class="tongji_tynum">({$data['glj_zs_num']}笔)</span></span></td>
									<td></td><td><span class="tongji_typri">{$data['glj_dk']}<span class="tongji_tynum">({$data['glj_dk_num']}笔)</span></span></td></tr>
							</table>
							<div class="tongji_typelist clearfix">								
								<div class="tongji_typeitem" id="alipay">
									{if $Think.session.user_level==1}
									<p class="tongji_type"><a href="{:url('count/agency_record')}">运营中心</a></p>
									<p class="tongji_typribox">
										<span class="tongji_numpri">{$data['oemlevel2']}家</span>
									</p>
									{else/}
									<p class="tongji_type">&nbsp;</p>
									<p class="tongji_typribox">
										<span class="tongji_numpri">&nbsp;</span>
									</p>									
									{/if}
								</div>
								<div class="tongji_typeitem" id="wechat">
									{if $Think.session.user_level==1 || $Think.session.user_level==2 }
									<p class="tongji_type"><a href="{:url('count/city_record')}">服务商</a></p>
									<p class="tongji_typribox">
										<span class="tongji_numpri">{$data['oemlevel3']}家</span>
									</p>
									{else/}
									<p class="tongji_type">&nbsp;</p>
									<p class="tongji_typribox">
										<span class="tongji_numpri">&nbsp;</span>
									</p>									
									{/if}
								</div>
								<div class="tongji_typeitem" id="alipay-bank">
									<p class="tongji_type"><a href="{:url('count/agent_record')}">商家</a></p>
									<p class="tongji_typribox">
										<span class="tongji_numpri">{$data['agents']}家</span>
									</p>
								</div>

								<div class="tongji_typeitem" id="accounting-pay">
									<p class="tongji_type"><a href="{:url('count/user_record')}">会员</a></p>
									<p class="tongji_typribox">
										<span class="tongji_numpri">{$data['mems']}人</span>
									</p>
								</div>
							</div>

						</div>
						<div id="main" style="height:400px; margin-top: 40px;"></div>
						<script type="text/javascript">
							// 基于准备好的dom，初始化echarts实例
							var mp = {
								$mp
							};
							var myChart = echarts.init(document.getElementById('main'));
							option = {
								title: {
									text: '交易数据分析',
									x: 'center'
								},
								tooltip: {
									trigger: 'item',
									formatter: "{a} <br/>{b} : {c} ({d}%)"
								},
								toolbox: {
									show: true,
									feature: {
										mark: {
											show: true
										},
										saveAsImage: {
											show: true
										}
									}
								},
								calculable: true,
								series: [

									{
										name: '面积模式',
										type: 'pie',
										radius: [20, 160],
										center: ['50%', '50%'],
										roseType: 'area',
										data: [{
											value: mp.sm,
											name: '扫码支付'
										}, {
											value: mp.sc,
											name: '商城交易'
										}, {
											value: mp.jz,
											name: '记账'
										}]
									}
								]
							};

							// 使用刚指定的配置项和数据显示图表。
							myChart.setOption(option);
						</script>

					</div>
				</div>
			</div>
		</div>
		<script src="__PUBLIC__/static/layui/layui.js" charset="utf-8"></script>
		<script>
			layui.use('laydate', function() {
				var laydate = layui.laydate;

				//常规用法
				laydate.render({
					elem: '#test1'
				});
			});
		</script>
		{include file="public/footer" /}
	</body>

</html>